﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Admin_MaintainStudentAcademic : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Session["typeofAccount"] = "Student";            
            loadData(Session["typeofAccount"].ToString());            
        }
        if (Request["UserID"] != null)
        {
            Control ct;
            ct = Page.LoadControl("~/Share/PersonDetails.ascx");
            pn_PersonDetails.Controls.Add(ct);
        }
    }

    public void loadData(string typeofData)
    {
        lb_list.Text = Session["typeofAccount"].ToString() + "'s List";
        UserDAO userDAO = new UserDAO();
        grv_Account.DataSource = userDAO.GetUserByType(typeofData);
        grv_Account.DataBind();
    }

    
}